<template>
    <div>
        <el-table :data="tableData" style="width: 100%">

            <el-table-column :label="item.label" :prop="item.prop" v-for="(item,index) in tableHeadData" :key="index">
                <el-table-column :label="e.label" :prop="e.prop" v-for="(e,idx) in item.children" :key="idx">
                    <el-table-column :label="obj.label" :prop="obj.prop" v-for="(obj, i) in e.children" :key="i">
                    </el-table-column>
                </el-table-column>
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
export default {
    data() {
        return {
            tableHeadData:[
                {
                    prop:'jbqk',
                    label:'基本情况',
                    children:[
                        {
                            prop: 'jh',
                            label: '警号',
                            children: []
                        },
                        {
                            prop: 'name',
                            label: '姓名',
                            children:[]
                        },
                        {
                            prop: 'dwmc',
                            label: '单位名称',
                            children: []
                        }
                    ]
                },
                {
                    prop: 'pmqk',
                    label: '排名情况',
                    children: [
                        {
                            prop: 'ydpm',
                            label: '月度排名',
                            children: []
                        }
                    ]
                },
                {
                    prop: 'baztqk',
                    label: '办案总体情况',
                    children: [
                        {
                            prop: 'jq',
                            label: '警情',
                            children: [
                                {
                                    prop: 'jcj',
                                    label: '接处警',
                                    children: []
                                }
                            ]
                        },
                        {
                            prop: 'xsaj',
                            label: '刑事案件',
                            children: [
                                {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                },
                                {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }
                            ]
                        },
                        {
                            prop: 'xzaj',
                            label: '行政案件',
                            children: [
                                {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                },
                                {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }, {
                                    prop: 'xssa',
                                    label: '刑事受案',
                                    children: []
                                }
                            ]
                        }
                    ]
                }
            ],
            tableData:[
               {
                    jh:'22112',
                    name:'张三',
                    dwmc:'单位名称',
                    ydpm:'23423',
                    jcj:'接处警11',
               }
            ]
        }
    },
    methods: {
        goEnter(){
            this.$router.push('/dataDetectionDetail')
        }
    },
    filters:{
        statusToColor(obj){
            let item={
                0:'red',
                1:'green'
            }
            return item[obj]
        }
    }
}
</script>
<style scoped>



.el-table thead.is-group th.el-table__cell,.el-table thead.is-group th.el-table__cell{
    background: #2b8f90;
}
</style>

